package com.geeksaga.common.util;

import java.util.Hashtable;

/**
 * @author newbie
 * @since 0.1
 */
public class SessionManager {
	public static SessionManager instance;
	public Hashtable<String, String> clients = new Hashtable<String, String>();

	private SessionManager() {
	}
	
	public static SessionManager getInstance() {
		if (instance == null)
			instance = new SessionManager();

		return instance;
	}

	public void addClient(String id, String value) {
		clients.put(id, value);
	}

	public void removeClient(String id) {
		clients.remove(id);
	}

	public Hashtable<String, String> getClient() {
		return clients;
	}

	public int getClientCount() {
		return clients.size();
	}
}